﻿@using Lib.core;
@using Lib.helper;

@using Lib.model;
@using Bll;
@using Model;
@{
    Layout = null;
    var list = ViewData["list"] as List<FileModel>;
}

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
            "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <!-- header page -->
    @Html.Partial(IncludePath("header"))
    <style type="text/css">
        .loglist .btn {
            margin:10px;
        }
    </style>
</head>

<body>
    @Html.Partial(IncludePath("body_top"))
    @Html.Partial(IncludePath("manage_nav"))

    <div class="container-fluid">

        <div class="row">
            <div class="col-md-12">
                <div class="box loglist">
                    @if (ValidateHelper.IsPlumpList(list))
                    {
                        FileModel model = null;
                        for (int i = 0; i < list.Count; ++i)
                        {
                            if ((model = list[i]) == null) { continue; }
                            <a href="/admin/log/readlog/?name=@(model.FileName)" class="btn btn-info" target="_self">
                                <span>@(model.FileName)</span>
                                <span>(@(model.Size/1024)KB)</span>
                            </a> 
                        } 
                        
                        <div class="right">一共找到@(list.Count)个日志文件</div>
                    }
                </div>
            </div>
        </div>

    </div>
    @Html.Partial(IncludePath("body_bottom"))
</body>
</html>
